<?php
echo $erreur;
$dropdown_parent=array(
    'table_name' => 'zoo_categories',
    'key_field' => 'id',
    'value_field' => 'nomfr',
    'init_data' => array('key'=>'0','name'=>'(Select parent)'),
    'where'=> array('parent'=>0)
);
?>

<div id="wrapper-content">
       <table class="titrepage" width="100%">
        <tr>
            <td >Ajouter un catégorie</td>
        </tr>
    </table>

        <?php echo form_open_multipart(site_url('product_admin/add_category')); ?>
        <table align="center" width="100%" class="list" cellpadding="10px" cellspacing="0">
            <tr>
                <td>Nom:</td>
                <td><input type="text" name="name" size="30" value=" <?php echo set_value('name') ?>">
                <?php echo form_error('name') ?><td>      
            </tr>
             <tr>
                <td>Catégorie parent:</td>
                <td>
                   <?php echo form_dropdown('parent',dropdown_data($dropdown_parent))?>
                </td>
            </tr>
             <tr>
                <td >Image:</td>
                <td><input size="30" type="file" name="userfile" id="userfile" size="25"/></td>

            </tr>
            <tr>
               <td></td>  <td><input type="submit" name="submit" value=" Ajouter "/></td>
            </tr>
        </table>

    <?php echo form_close()?>
</div>

